{% extends "base.html" %}

{% block content %}
<div style="max-width: 400px; margin: 2rem auto; padding: 2rem; background: rgba(255,255,255,0.1); border-radius: 1rem;">
    <h2>登录</h2>
    {% if error %}
    <p style="color: #ff6b6b;">{{ error }}</p>
    {% endif %}
    <form method="post">
        {% csrf_token %}
        <div style="margin-bottom: 1rem;">
            <label style="display: block; margin-bottom: 0.5rem;">用户名</label>
            <input type="text" name="username" required style="width: 100%; padding: 0.5rem;">
        </div>
        <div style="margin-bottom: 1rem;">
            <label style="display: block; margin-bottom: 0.5rem;">密码</label>
            <input type="password" name="password" required style="width: 100%; padding: 0.5rem;">
        </div>
        <button type="submit" style="background: var(--secondary); color: white; border: none; padding: 0.5rem 1rem; border-radius: 0.25rem;">登录</button>
    </form>
</div>
{% endblock %}